﻿<UserControl x:Class="PocketBook.Views.Designs.ChecklistPageView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Controls="clr-namespace:PocketBook.Controls" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style x:Key="GrayBoxStyle" TargetType="Rectangle">
            <!--<Style.Triggers>
                <DataTrigger Binding="{Binding HasGrayBox}" Value="False" >
                    <Setter Property="Visibility" Value="Collapsed" />
                </DataTrigger>
            </Style.Triggers>-->
        </Style>

    </UserControl.Resources>
    <DockPanel Margin="10">
        <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding Path=Settings}" SnapsToDevicePixels="true">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Border BorderThickness="0,0,0,1" BorderBrush="Black" Margin="4" Padding="0,1,0,3">
                        <Border.Style>
                            <Style TargetType="{x:Type Border}">
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Path=Text.Length}" Value="0">
                                        <Setter Property="Visibility" Value="Hidden" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Border.Style>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                                <ColumnDefinition  Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Rectangle Width="13" Height="13" Fill="White" Stroke="Black" Margin="0,0,6,0" >
                                <Rectangle.Effect>
                                    <DropShadowEffect Opacity="0.5" Direction="335" BlurRadius="2" ShadowDepth="3" />
                                </Rectangle.Effect>
                            </Rectangle>
                            <TextBlock Grid.Column="1" Text="{Binding Text}" TextTrimming="CharacterEllipsis" />
                            <Rectangle Grid.Column="2" Width="30" Fill="Gainsboro" Margin="2,0,0,0" Style="{StaticResource GrayBoxStyle}" />
                        </Grid>
                    </Border>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
            <!--<ItemsControl.Items>
                <System:String>hello</System:String>
                <System:String>hello</System:String>
                <System:String>hello</System:String>
            </ItemsControl.Items>-->
        </ItemsControl>
        <TextBlock DockPanel.Dock="Top" Text="Notes:" FontFamily="Georgia" FontWeight="Bold" Margin="4,4,4,0" />
        <Controls:ParallelLines Margin="4,0,4,0" Spacing="26" />
    </DockPanel>
</UserControl>
